The present invention relates to Web services and in particular to testing Web service interfaces.
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
The term “Web services” describes a standardized way of accessing Web-based applications over the Internet, or more generally any communication network. Web services are typically used by businesses to communicate with each other and with clients. Web services allow businesses to communicate data without intimate knowledge of each other's systems.
When a client and a Web service communicate they exchange messages. See, for example, FIG. 1 where a request message 112 is sent from a client 102 to a Web service 104 over a communication network 106, such as the Internet. The Web service 104 responds with a response message 114. The client 102 serves as an interface to the Web service 104, and provides a user interface to receive data from a user. For example, a simple interface may be form having input fields into which a user enters data. The client 102 wraps that data into a suitable request message 112 that is then transmitted to the Web service 104. The Web service 104 receives the message 112, performs one or more services to service the request message 112, and generates a response message 114 that is transmitted to the client 102.
Web services are based on several well known standards. For example, the Extensible Markup Language (XML) definition is used to tag the data. The Simple Object Access Protocol (SOAP) is used to transfer the data. Services provided by the Web service 104 may be described and defined using the Web Services Definition Language (WSDL). Web services may be discovered using the Universal Description Discovery and Integration (UDDI) definition which provides a method for publishing and finding service descriptions.
Testing the behavior of Web services always requires the assembling of individual test data for each test case. Suppose a data element called DATE is provided in a Web service. Examples for test cases for testing the DATE data element may include:
Positive (valid data) test case for DATE: . . . <DATE>01.01.2011</DATE>
Negative (invalid data) test case for DATE: . . . <DATE>31.02.2011</DATE>
Performing a proper test on a Web service may require testing several valid and invalid data values for each input field comprising the interface for the Web services. Consequently, a large number of test cases may have to be generated to test each input field and different values for each input field. Assembling huge amounts of test data manually is very time consuming. In addition it is very error-prone and requires a lot of manual changes, when the Web Services are changed.
These and other issues are addressed by embodiments of the present invention, individually and collectively.